﻿// <copyright file="ViewModel.cs" company="Microsoft Corporation">
// Copyright (c) 2011 Microsoft Corporation All Rights Reserved
// </copyright>
// <author>Michael S. Scherotter</author>
// <email>mischero@microsoft.com</email>
// <date>2011-02-11</date>
// <summary>View Model</summary>

namespace DemoNYTimes
{
    using System;
    using System.Collections.ObjectModel;

    /// <summary>
    /// A demo page
    /// </summary>
    public class DemoPage
    {
        /// <summary>
        /// Gets or sets the name of the page
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the Uri of the page
        /// </summary>
        public Uri Url { get; set; }
    }

    /// <summary>
    /// The view model
    /// </summary>
    public class ViewModel
    {
        /// <summary>
        /// Initializes a new instance of the ViewModel class.
        /// </summary>
        public ViewModel()
        {
            var pages = new DemoPage[]
            {
                new DemoPage { Name = "Articles", Url = new Uri("/DemoNYTimes;component/ArticlesPage.xaml", UriKind.Relative) },
                new DemoPage { Name = "Bestsellers", Url = new Uri("/DemoNYTimes;component/BestSellersPage.xaml", UriKind.Relative) },
                new DemoPage { Name = "Bills Cosponsored By Member", Url = new Uri("/DemoNYTimes;component/BillsCosponsoredByMember.xaml", UriKind.Relative) },
                new DemoPage { Name = "Campaign Finance", Url = new Uri("/DemoNYTimes;component/CampaignFinancePage.xaml", UriKind.Relative) },
                new DemoPage { Name = "Community Comments", Url = new Uri("/DemoNYTimes;component/CommunityComments.xaml", UriKind.Relative) },
                new DemoPage { Name = "Community Comments by Date", Url = new Uri("/DemoNYTimes;component/CommunityCommentsByDatePage.xaml", UriKind.Relative) },
                new DemoPage { Name = "Congressional Bills", Url = new Uri("/DemoNYTimes;component/CongressionalBillPage.xaml", UriKind.Relative) },
                new DemoPage { Name = "Movie Reviews", Url = new Uri("/DemoNYTimes;component/MovieReviewsPage.xaml", UriKind.Relative) },
                new DemoPage { Name = "Newswire", Url = new Uri("/DemoNYTimes;component/NewswirePage.xaml", UriKind.Relative) },
                new DemoPage { Name = "Campaign Finance State Zip Totals", Url = new Uri("/DemoNYTimes;component/StateZipTotalsPage.xaml", UriKind.Relative) },
                new DemoPage { Name = "Times People", Url = new Uri("/DemoNYTimes;component/TimesPeoplePage.xaml", UriKind.Relative) },
                new DemoPage { Name = "Times Tags", Url = new Uri("/DemoNYTimes;component/TimesTagsPage.xaml", UriKind.Relative) },
            };

            this.Pages = new ObservableCollection<DemoPage>(pages);
        }

        /// <summary>
        /// Gets the demo pages
        /// </summary>
        public ObservableCollection<DemoPage> Pages { get; private set; }
    }
}
